﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 接口
{
    public abstract class Employee:IPayable
    {
        //read-only property that gets Employee's first name
        public string FirstName { get; private set; }

        public string LastName { get; private set; }

        public string SocialSecurityNumber { get; private set; }

        public Employee(string first, string last, string number)
        {
            FirstName = first;
            LastName = last;
            SocialSecurityNumber = number;
        }//end constructor Employee

        public override string ToString()
        {
            return string.Format("{0} {1}\nsocial scurity number: {2}", FirstName, LastName, SocialSecurityNumber);
        }

        public abstract decimal GetPaymentAmount();
    }
}
